package com.example.myhuangye.YH;

import android.content.Intent;
import android.net.Uri;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.ImageButton;

import com.example.myhuangye.R;

public class MainYH0ctivity extends AppCompatActivity implements View.OnClickListener{
    private Button YH6,YH7,YH8,YH9;
    private ImageButton YHcall6,YHcall7,YHcall8,YHcall9;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main_yh0ctivity);
        YH6= (Button) findViewById(R.id.YH6);
        YH6.setOnClickListener(this);
        YHcall6= (ImageButton) findViewById(R.id.YHcall6);
        YHcall6.setOnClickListener(this);
        YH7= (Button) findViewById(R.id.YH7);
        YH7.setOnClickListener(this);
        YHcall7= (ImageButton) findViewById(R.id.YHcall7);
        YHcall7.setOnClickListener(this);
        YH8= (Button) findViewById(R.id.YH8);
        YH8.setOnClickListener(this);
        YHcall8= (ImageButton) findViewById(R.id.YHcall8);
        YHcall8.setOnClickListener(this);
        YH9= (Button) findViewById(R.id.YH9);
        YH9.setOnClickListener(this);
        YHcall9= (ImageButton) findViewById(R.id.YHcall9);
        YHcall9.setOnClickListener(this);
        findViewById(R.id.HT10).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                finish();
            }
        });

    }//回退//

    public void onClick(View view) {//点击事件//
        switch (view.getId()){
            case R.id.YH6:
                Uri uri = Uri.parse("http://www.cebbank.com");
                Intent intent = new Intent(Intent.ACTION_VIEW, uri);
                startActivity(intent);

                break;
            case R.id.YHcall6:
                Intent intent1=  new Intent(Intent.ACTION_DIAL);
                intent1.setData(Uri.parse("tel:95595"));
                startActivity(intent1);
                break;

            case R.id.YH7:
                Uri uri1 = Uri.parse("http://www.cgbchina.com.cn");
                Intent intent2 = new Intent(Intent.ACTION_VIEW, uri1);
                startActivity(intent2);

                break;
            case R.id.YHcall7:
                Intent intent3=  new Intent(Intent.ACTION_DIAL);
                intent3.setData(Uri.parse("tel:95508"));
                startActivity(intent3);
                break;

            case R.id.YH8:
                Uri uri2 = Uri.parse("http://www.hrxjbank.com");
                Intent intent4 = new Intent(Intent.ACTION_VIEW, uri2);
                startActivity(intent4);

                break;
            case R.id.YHcall8:
                Intent intent5=  new Intent(Intent.ACTION_DIAL);
                intent5.setData(Uri.parse("tel:96599"));
                startActivity(intent5);
                break;

            case R.id.YH9:
                Uri uri3 = Uri.parse("http://www.gzcb.com.cn");
                Intent intent6 = new Intent(Intent.ACTION_VIEW, uri3);
                startActivity(intent6);

                break;
            case R.id.YHcall9:
                Intent intent7=  new Intent(Intent.ACTION_DIAL);
                intent7.setData(Uri.parse("tel:96699"));
                startActivity(intent7);
                break;


        }


    }



}




